import request from '@/utils/request'

// 获取我的待办
export function getFlowTodoCount() {
  return request({
    url: '/api/visualdev/Dashboard/FlowTodoCount',
    method: 'get'
  })
}
// 获取通知公告
export function getNotice() {
  return request({
    url: '/api/visualdev/Dashboard/Notice',
    method: 'get'
  })
}
// 获取未读邮件
export function getEmail() {
  return request({
    url: '/api/visualdev/Dashboard/Email',
    method: 'get'
  })
}
// 获取待办事项
export function getFlowTodo() {
  return request({
    url: '/api/visualdev/Dashboard/FlowTodo',
    method: 'get'
  })
}
// 获取我的待办事项
export function getMyFlowTodo() {
  return request({
    url: '/api/visualdev/Dashboard/MyFlowTodo',
    method: 'get'
  })
}

// 首页信息
export function saleDetail() {
  return request({
    url: '/api/crm/dashboardInfo/saleDetail',
    method: 'post'
  })
}

// 首页商机汇总信息
export function saleGather() {
  return request({
    url: '/api/crm/dashboardInfo/saleGather',
    method: 'post'
  })
}


// 实时互动数据
export function opportunityActual() {
  return request({
    url: '/api/crm/dashboardInfo/opportunityActual',
    method: 'post'
  })
}


// 公司商机数据
export function opportunityCompany() {
  return request({
    url: '/api/crm/dashboardInfo/opportunityCompany',
    method: 'post'
  })
}


// 获取收藏菜单
export function getCollectList(data) {
  return request({
    url: '/api/system/BaseModuleOffen/getList',
    method: 'post',
    data
  })
}


// 收藏菜单
export function collectMenu(data) {
  return request({
    url: '/api/system/BaseModuleOffen',
    method: 'post',
    data
  })
}


// 取消收藏菜单
export function cancelHandheldMenu(id) {
  return request({
    url: `/api/system/BaseModuleOffen/${id}`,
    method: 'DELETE'
  })
}
